package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntColor;
import emp.jsf.servicio.ColorService;
import emp.repositorios.ColorRepository;

@Service("ColorService")
public class ColorServiceImpl implements ColorService{

	@Autowired
	ColorRepository colorRepository;
	
	public List<EntColor> listarColores(){
		return colorRepository.findAll();
	}
	
	public EntColor grabarColor(EntColor ent){
		return colorRepository.save(ent);
	}
	
	public void eliminar(EntColor ent){
		colorRepository.delete(ent);
	}
	
}